﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Collections;

namespace Pc_Vision.View_Datalayer_Site
{
    public partial class viewDataLayerAllProductsSite : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        //fn_ShowAllProducts
        public void fn_ShowAllProducts(object sender, EventArgs e)
        {
            DAOFactorys.DAOproduct daoProduct = new DAOFactorys.DAOproduct();
            ArrayList result = daoProduct.GetAllProducts();
            string product = "";


            foreach (Model.Product p in result)
            {
                product += "<table>";
                
                product += "<tr><td>Product naam:</td><td>" + p.name.ToString() + "</td></tr>" ;
                product += "<tr><td>Product omschrijving:</td><td>" + p.productDescription + "</td></tr>";
                product += "<tr><td>Artikelnummer:</td><td><asp:Label ID=\"articleNumber\" runat=\"server\">" + p.articleNumber + "</asp:Label></td></tr>";
                product += "<tr><td>Gewicht:</td><td>" + p.weight + "</td></tr>";
                product += "<tr><td>Systeemtype:</td><td>" + p.systemType + "</td></tr>";
                product += "<tr><td>Processor:</td><td>" + p.processor + "</td></tr>";
                product += "<tr><td>RAM-Geheugen:</td><td>" + p.memory + "</td></tr>";
                product += "<tr><td>Opslag:</td><td>" + p.storage + "</td></tr>";
                product += "<tr><td>Optische schijf:</td><td>" + p.opticalDisk + "</td></tr>";
                product += "<tr><td>Schermresolutie:</td><td>" + p.display + "</td></tr>";
                product += "<tr><td>Netwerkkaart:</td><td>" + p.networkCard + "</td></tr>";
                product += "<tr><td>Videokaart:</td><td>" + p.videoCard + "</td></tr>";
                product += "<tr><td>Accu:</td><td>" + p.battery + "</td></tr>";
                product += "<tr><td>Afmetingen:</td><td>" + p.dimension + "</td></tr>";
                product += "<tr><td>Garantie:</td><td>" + p.warranty + "</td></tr>";
                product += "<tr><td>Op voorraad:</td><td>" + p.inStock + "</td></tr>";

                product += "</table>";
            }
            producten.InnerHtml = product;
        }
    }
}